Skip to content

[ET-VK] Fix VMA assertion caused by bool return type truncation#18721

Open
pytorchbot wants to merge 1 commit intorelease/1.2from
cherry-pick-18105-by-pytorch_bot_bot_
Open

[ET-VK] Fix VMA assertion caused by bool return type truncation#18721
pytorchbot wants to merge 1 commit intorelease/1.2from
cherry-pick-18105-by-pytorch_bot_bot_

Conversation

@pytorchbot
Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

The test_host_cached_available function in Allocator.cpp was introduced in
D95836687 with a bool return type, but its return statements return
VmaAllocationCreateFlags values (VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT
= 0x1000 and VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT = 0x800).
The bool return type truncates both to 1, which equals
VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT — not a host access flag.

This caused VMA to assert when allocating host-mapped staging buffers because
the allocation had MAPPED_BIT + AUTO_PREFER_HOST but no host access flag.

Fix the return type from bool to VmaAllocationCreateFlags so the correct
flag values are preserved.

Differential Revision: D96151798

Differential Revision: D96151798

Pull Request resolved: #18105

(cherry picked from commit 7d43a9f)
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 6, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18721

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 Cancelled Jobs, 1 Unrelated Failure

As of commit 918b1bb with merge base 8c0a60b (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants